package com.nvshen.zhangmeiying.model;

import java.io.Serializable;

/**
 * Created by wxc on 14-8-4.
 */
public class Message implements Serializable
{
    public User from_user;
    public int message_type;
    public String content;
    public String origin_content;
    public Article article;
    public int created_at;

    public String getMessageContent()
    {
        if (message_type == MESSAGE_TYPE_COMMENT)
        {
            return "新评论: " + content;
        }
        else if (message_type == MESSAGE_TYPE_NEW_ARTICLE)
        {
            return "有了新文章";
        }
        else if (message_type == MESSAGE_TYPE_AT_COMMENT)
        {
            return "回复了你的评论: " + content;
        }
        else if (message_type == MESSAGE_TYPE_VOTE_UP)
        {
            return "赞了你";
        }
        else if (message_type == MESSAGE_TYPE_FEED_YOU)
        {
            return "关注了你";
        }
        else if (message_type == MESSAGE_TYPE_GIFT)
        {
            return "送了你礼物";
        }
        else if(message_type == MESSAGE_TYPE_SYSTEM)
        {
            return content;
        }
        else
        {
            return "";
        }

    }

    /**
     * 普通评论
     */
    public static final int MESSAGE_TYPE_COMMENT = 100;
    /**
     * 关注的人有了新文章
     */
    public static final int MESSAGE_TYPE_NEW_ARTICLE = 101;
    /**
     * 回复了你
     */
    public static final int MESSAGE_TYPE_AT_COMMENT = 102;
    /**
     * 赞
     */
    public static final int MESSAGE_TYPE_VOTE_UP = 103;
    /**
     * 关注了你
     */
    public static final int MESSAGE_TYPE_FEED_YOU = 104;

    /**
     * 系统消息
     */
    public static final int MESSAGE_TYPE_GIFT = 105;

    /**
     * 系统消息
     */
    public static final int MESSAGE_TYPE_SYSTEM = 130;

}
